﻿using System;
using System.Collections.Generic;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Ria.Data;
using System.Windows.Shapes;
using AnnouncementServices;

namespace MySilverlightApplication.Model
{
    public class AnnouncementsModel : IAnnouncementsModel
    {
        public void GetAnnouncementList(Action<IEnumerable<Announcement>> action)
        {
            var context = new AnnouncementDomainContext();
            var qry = context.GetAnnouncementsQuery().Where(a => a.ModuleID == 376);
            context.Load(qry, op => action(op.Entities), null);
        }
    }
}
